#ifndef Exception_h
#define Exception_h

#include <string>

#include "utility.h"

using namespace std;

	class CException{
	public:
		enum { EMPTY_ERROR_NO = 32767,  EMPTY_LINE_NO = -1 };
		
	protected:
		int m_ErrorNo;
		string m_ErrorMsg;
		string m_FileName;
		int m_LineNo;    
	
	public:
		CException(int n_ErrorNo, const char * n_ErrorMsg, const char * n_FileName = NULL, int n_LineNo = EMPTY_LINE_NO);
		CException(const char * n_ErrorMsg, const char * n_FileName = NULL, int n_LineNo = EMPTY_LINE_NO);
		CException(const CException& n_Src);
		virtual ~CException() {}
	
		int get_error_no() const { return m_ErrorNo; }
		string get_error_msg() const { return m_ErrorMsg; }
		string get_file_name() const { return m_FileName; }
		int get_line_no() const { return m_LineNo; }
	
		string make_Log_msg() const;
	};

#endif
